# -*- coding: utf-8 -*-
__author__ = 'xiaobo'
# 导入MySQL驱动:
import mysql.connector
from FileUtile import *

config={'host':'127.0.0.1',#默认127.0.0.1
        'user':'root',
        'password':'123456',
        'port':3306 ,#默认即为3306
        'database':'test',
        'charset':'utf8'#默认即为utf8
        }
try:
  cnn=mysql.connector.connect(**config)
  print 'ddd'
except mysql.connector.Error as e:
  print('connect fails!{}'.format(e))